﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BusinessManagementStudio.ViewModel.ReportView>" ContentType="text/json" %>
<%@ Import Namespace="System.Globalization" %>

{rows:[<% for (var i = 0; i < Model.WorkOrderList.Count; i++ ){ %>
    {"id":"<%=Model.WorkOrderList[i].ID%>", 
        "data":[    
                "<%= Model.WorkOrderList[i].ServiceOrderNo != null ? Model.WorkOrderList[i].ServiceOrderNo : ""%>", 
                "<%= Model.WorkOrderList[i].Location != null ? Model.WorkOrderList[i].Location : ""%>",
                "<%= Model.WorkOrderList[i].WorkOrderNo != null ? Model.WorkOrderList[i].WorkOrderNo : ""%>",
                "<%= Model.WorkOrderList[i].InvoiceNo != null ? Model.WorkOrderList[i].InvoiceNo : ""%>",
                "<%= Model.WorkOrderList[i].QuotationNo != null ? Model.WorkOrderList[i].QuotationNo : ""%>",
                "<%= Model.WorkOrderList[i].TotalAmountInHKD != null ? Model.WorkOrderList[i].TotalAmountInHKD.ToString("#,##0.00") : ""%>",
                "<%= Model.WorkOrderList[i].SubContractor != null ? Model.WorkOrderList[i].SubContractor : ""%>",
                "<%= Model.WorkOrderList[i].SubConAmountInHKD != null ? Model.WorkOrderList[i].SubConAmountInHKD.ToString("#,##0.00") : ""%>",
                "<%= Model.WorkOrderList[i].Material != "" ? Model.WorkOrderList[i].Material : ""%>",
                "<%= Model.WorkOrderList[i].Remarks != null ? Model.WorkOrderList[i].Remarks : ""%>"
            ]}<%= i < Model.WorkOrderList.Count ? "," : ""%>               
<% } %>]}

